﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PromotionApp.Model;
using System.Data.SqlClient;
using System.Data;

namespace PromotionApp.DAL
{
    public class ModulatorActivityDAL : BaseDAL
    {
        #region Private Variable

        private static ModulatorActivityDAL _ModulatorActivityDAL = null;

        #endregion

        #region Constructor

        private ModulatorActivityDAL() : base()
        {

        }

        #endregion

        #region Public Method     
   
        public void AddModulatorActivity(ModulatorActivity log, SqlConnection conn)
        {
            string strSql = "TxModulatorActivityInsert";
            List<SqlParameter> list = new List<SqlParameter>();
            list.Add(new SqlParameter("PostType", log.PosteType));
            list.Add(new SqlParameter("PostId", log.PostId));
            list.Add(new SqlParameter("UserId", log.UserId));
            list.Add(new SqlParameter("StatusCode", log.StatusCode));            
            this._SQLHelper.ExecuteNonQueryTransaction(strSql, list, CommandType.StoredProcedure, conn);
        }

        public static ModulatorActivityDAL GetInstance()
        {
            if (_ModulatorActivityDAL == null)
                _ModulatorActivityDAL = new ModulatorActivityDAL();

            return _ModulatorActivityDAL;
        }

        #endregion
    }
}